#include <stdio.h>

int main(int argc, const char *argv[])
{
	int s[10] = {23,5,6,7,1,78,9,123,546,400};
	//排序前
	int i = 0;
	int j = 0;
	int a = 0;

	for(i = 0; i < 10; i++){
		printf("%d  ", s[i]);
	}
	printf("\n");
	printf("---------------------------------------\n");

	//第一趟排序
	
	for(i = 0; i < 9; i++)
	{
		if(s[i] > s[i+1])
		{
			a = s[i];
			s[i] = s[i + 1];
			s[i + 1] = a;
		}
	}


	//排序后
	for(i = 0; i < 10; i++){
		printf("%d  ", s[i]);
	}
	printf("\n");

	return 0;
}
